package com.atguigu;

import jakarta.annotation.PostConstruct;
import jakarta.annotation.Resource;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;

@SpringBootApplication
public class MyCouponBatchSendApplication {
    @Resource
    private ThreadPoolTaskExecutor threadPool;
    @PostConstruct
    public void getThreadPoolConfig(){
        System.out.println("threadPool.getCorePoolSize() = " + threadPool.getCorePoolSize());
        System.out.println("threadPool.getMaxPoolSize() = " + threadPool.getMaxPoolSize());
        System.out.println("threadPool.getQueueCapacity() = " + threadPool.getQueueCapacity());
        System.out.println("threadPool.getKeepAliveSeconds() = " + threadPool.getKeepAliveSeconds());
        System.out.println("Runtime.getRuntime().availableProcessors() = " + Runtime.getRuntime().availableProcessors());
    }

    public static void main(String[] args) {
        SpringApplication.run(MyCouponBatchSendApplication.class, args);
    }

}
